#!/bin/bash

source {{pbase}}/{{pname}}/bin/init_env.sh

cd {{pbase}}/{{pname}}/fate/python/fate_client
python setup.py install

cd {{pbase}}/{{pname}}/fate/python/fate_test
python setup.py install

cd {{pbase}}/{{pname}}

flow init -c '{{pbase}}/{{pname}}/conf/service_conf.yaml'
pipeline init --ip '{{ansible_ssh_host}}' --port '{{fate_flow.get("httpPort", 9380)}}' --app-key '{{fate_flow.get("http_app_key", "")}}' --secret-key '{{fate_flow.get("http_secret_key", "")}}'

fate_test data upload -t min_test -y
